import com.shf.util.JwtUtil;
import io.jsonwebtoken.Claims;
import org.junit.jupiter.api.Test;

/**
 * @author 叶枫
 * @date 2023/11/20.
 */


public class T1 {
    @Test
    public void test1(){
        try {
            Claims claims = JwtUtil.parseJWT("eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiI1MDFmZWZhMjE3OWY0NzM4OTg1MmNlOTJkOWU1MzJiMyIsInN1YiI6IjEiLCJpc3MiOiJIRiIsImlhdCI6MTcwMDQ4MTcyMSwiZXhwIjoxNzAwNzQwOTIxfQ.TzV_XCSG1SRJWlbPsxwp1zjppkGZRITeGbYu0dtMx-M");
            String userId = claims.getSubject();
            System.out.println(userId);

        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}
